An application is run on a processor for the purpose of performing one or more tasks on a system. The application, which is made up of computer code, contains application logic that dictates how the system processes different inputs in different scenarios. Errors that are generated during execution of the computer program are stored in an error buffer and subsequently reported to the user.
A computer program can be modularized and event-driven by implementing the application logic using events and event handlers. An event is an input (e.g., a user action or system occurrence) that can be detected by the computer program. Exemplary events include pressing a button on a mouse, pressing a key on a keyboard, or a threshold being reached. When an event is triggered (also known as raising an event), event handlers related to the event are called to process the event. However, errors that are generated during execution of an event handler have no way of being stored in the error buffer since there is no communication channel from the event handler back to the application. As a result, the application's error buffer does not provide a full representation of the errors that occurred during execution of the application.